From: Carlos Garnacho Date: Fri, 16 Oct 2015 16:12:45 +0000 (+0200) Subject: workspaceThumbnail: Enable activation of window clones on touch X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~1044 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=06f78549bd2d67926af055fa0d2c7bb773845d64;p=gnome-shell.git workspaceThumbnail: Enable activation of window clones on touch We must handle the TOUCH_END event separately for the evdev input backend. https://bugzilla.gnome.org/show_bug.cgi?id=756748 --- diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js index df8bc5563..3b650ba29 100644 --- a/js/ui/workspaceThumbnail.js +++ b/js/ui/workspaceThumbnail.js @@ -80,6 +80,8 @@ const WindowClone = new Lang.Class({ this.actor.connect('button-release-event', Lang.bind(this, this._onButtonRelease)); + this.actor.connect('touch-event', + Lang.bind(this, this._onTouchEvent)); this.actor.connect('destroy', Lang.bind(this, this._onDestroy)); @@ -200,6 +202,15 @@ const WindowClone = new Lang.Class({ return Clutter.EVENT_STOP; }, + _onTouchEvent : function (actor, event) { + if (event.type() != Clutter.EventType.TOUCH_END || + !global.display.is_pointer_emulating_sequence(event.get_event_sequence())) + return Clutter.EVENT_PROPAGATE; + + this.emit('selected', event.get_time()); + return Clutter.EVENT_STOP; + }, + _onDragBegin : function (draggable, time) { this.inDrag = true; this.emit('drag-begin');